function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 6function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } >function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 2function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 4function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } xfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } >function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } xfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } >function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } >function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } >function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } zfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 6function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 4function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 4function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } xfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } %function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } %function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } #function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 5function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 5function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 5function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } %function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } %function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } #function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 9function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 4function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 2function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 3function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } %function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } %function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } #function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 6function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 5function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } jfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } jfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } >function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } >function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } zfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } jfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } xfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } >function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } jfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } xfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } >function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } >function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } zfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 2function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ?function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } zfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } @function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 9function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 4function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 4function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 5function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 9function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 4function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 4function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 6function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 9function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 4function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 4function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 7function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } &function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } +function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } +function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 3function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } @function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 4function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 6function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 7function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } &function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } &function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } &function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } [function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ]function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } >function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } [function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ]function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } >function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 2function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } jfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 7function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } jfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } jfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 3function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } xfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 2function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } xfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 3function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } jfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } !function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } kfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } qfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } $function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } !function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } &function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } &function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } !function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } &function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } &function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } !function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } xfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 6function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } xfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 8function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } -function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 3function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 6function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } zfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } *function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } !function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } }function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } !function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } {function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } /function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 2function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } xfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } bfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } xfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 2function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } !function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } =function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 2function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } yfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } Rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } :function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } dfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ufunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ;function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ffunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } &function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } &function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } cfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } mfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } afunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } gfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } pfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } (function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } lfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } hfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } wfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } tfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } _function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } vfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } efunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } rfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } sfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ifunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ofunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } nfunction lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } )function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 1function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 3function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } .function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 0function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } ,function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); } 'function lh_maybe_upgrade() { if ( get_option( 'lh_db_version' ) !== LH_DB::VERSION ) { if ( LH_DB::has_data() ) { // Existing site: never run long ALTERs on a page load. Side tables now, recalls-table steps from the dashboard. LH_DB::prepare_upgrade(); } else { LH_DB::install(); } } if ( get_option( 'lh_rewrite_version' ) !== LH_VERSION ) { LH_Admin::create_default_pages( '1.2' !== get_option( 'lh_pages_seeded' ) ); update_option( 'lh_pages_seeded', '1.2' ); flush_rewrite_rules(); LH_Sync::schedule(); if ( method_exists( 'LH_Alerts', 'schedule' ) ) { LH_Alerts::schedule(); } if ( method_exists( 'LH_Roundup', 'schedule' ) ) { LH_Roundup::schedule(); } delete_option( 'lh_needs_reslug' ); if ( get_option( 'lh_rewrite_version' ) && version_compare( (string) get_option( 'lh_rewrite_version' ), '1.3.0', '<' ) ) { // 1.3.x changed the reason, state, retailer and brand rules: reclassify every record in the background (titles and URLs untouched). LH_Sync::queue_reclassify(); wp_schedule_single_event( time() + 60, 'lh_after_upgrade' ); } update_option( 'lh_rewrite_version', LH_VERSION ); } delete_transient( 'lh_upgrade_lock' ); }